package com.g13.virtualpethospital.service;

import com.g13.virtualpethospital.entity.CaseEntity;
import com.g13.virtualpethospital.exceptions.CaseException;

import java.util.List;

/**
 * @Title: CaseService
 * @Author yyj1205
 * @Package com.g13.virtualpethospital.service
 * @Date 24/3/2024 20:09
 * @description: 病例的相关服务
 */
public interface CaseService {
    /**
     * 返回所有的用例
     * @return
     */
    public List<CaseEntity> findAllCase();

    /**
     * 按照种类查找病例，留空视为不做筛选
     * @param type
     * @param subType
     * @return
     */
    public List<CaseEntity> findCaseByType(String type, String subType);

    /**
     * 按关键字查找病例，留空代表不做筛选
     * @param name
     * @return
     */
    public List<CaseEntity> findCaseByName(String name);

    /**
     * 按ID查找病例
     * @param id
     * @return
     */
    public List<CaseEntity> findCaseById(String id);

    /**
     * 新增病例
     * @param caseEntity
     */
    public void addCase(CaseEntity caseEntity);

    /**
     * 更新病例数据
     * @param caseEntity
     * @param caseId
     */
    public void updateCase(CaseEntity caseEntity, String caseId) throws CaseException;

    /**
     * 删除病例
     * @param caseId
     */
    public void deleteCase(String caseId) throws CaseException;

}
